package no.ntnu.fp.services.impl;

import java.util.List;

import no.ntnu.fp.model.Employee;
import no.ntnu.fp.model.Meeting;
import no.ntnu.fp.services.MeetingService;
import no.ntnu.fp.storage.MeetingStorage;
import no.ntnu.fp.utils.Participant;

public class MeetingServiceImpl extends EntityServiceImpl<Meeting> implements MeetingService {

	private final MeetingStorage meetingStorage;

	public MeetingServiceImpl(MeetingStorage meetingStorage) {
		this.meetingStorage = meetingStorage;
	}
	
	public List<Meeting> getMeetingsByEmployee(Employee employee) {
		return meetingStorage.getMeetingsByEmployee(employee);
	}

	@Override
	public Meeting addMeeting(Meeting meeting) {
		return meetingStorage.addMeeting(meeting);
	}

	@Override
	public List<Participant> updateMeeting(Meeting meeting) {
		return meetingStorage.updateMeeting(meeting);
	}

	@Override
	public void cancelMeeting(Meeting meeting) {
		meetingStorage.cancelMeeting(meeting);
	}

	@Override
	public Meeting markAsParticipating(Meeting meeting, Employee employee) {
		return meetingStorage.markAsParticipating(meeting, employee);
	}

	@Override
	public Meeting markNotParticipating(Meeting meeting, Employee employee) {
		return meetingStorage.markNotParticipating(meeting, employee);
	}
}
